<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="<?php echo $pageNum ?>" /> <input
		type="hidden" name="numPerPage" value="<?php echo $limit ?>" /> <input
		type="hidden" name="orderField" value="<?php echo $field ?>" /> <input
		type="hidden" name="orderDirection" value="<?php echo $order_by ?>" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"
		action="<?php echo site_url('backend/stock/fillIndex'); ?>"
		method="post">
		<div class="searchBar">
			<ul class="searchContent">
				<li><label>订单编号：</label> <input type="text" name="order_num"
					value="<?php echo $this->input->post('name') ?>" /></li>
				<li><select class="combox" name="s=status">
						<option value="">所有状态</option>
						<?php echo $this->html_helper->select(array('0'=>'关闭', '1'=>'等待总仓确定','3'=>'总仓确定','10'=>'完成'),$this->input->post('s=status'));?>
					</select></li>
				<li>
					<select name="s=address_id" class="combox">
						<option value="">所有分类</option>
						<?php echo $this->html_helper->select($address, $this->input->post('s=address_id'))?>
					</select>
				</li>
			</ul>
			<div class="subBar right">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">检索</button>
							</div>
						</div></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li class="line">line</li>
			<li><a class="icon" href="javascript:;" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="112">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids"
					class="checkboxCtrl"></th>
				<th orderField="id" class="<?php echo $order_by ?>">ID</th>
				<th>订单编号</th>
				<th>请求总数量</th>
				<th>仓库地址</th>
				<th>状态</th>
				
				<th>下单时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody class="gridImg">
			<?php foreach ($data as $al): ?>
				<tr target="sid_user" rel="<?php echo $al['id'] ?>">
				<td><input name="ids" value="<?php echo $al['id'] ?>"
					type="checkbox"></td>
				<td><?php echo $al['id'] ?></td>
				<td><?php echo $al['order_num'] ?></td>
				<td><?php echo $al['request_total_num'] ?></td>
				<td><?php echo $al['address'] ?></td>
				<td>
						<?php if($al['status'] == 0){
							echo '关闭';	
						}else if ($al['status'] == 1) {
							echo '等待总仓确定';
						}else if($al['status'] == 3){
							echo '总仓确定';
						}else if ($al ['status'] == 10 ){
							echo '订单完成';
						} ?>
					</td>
				
				<td><?php echo date('Y-m-d H:i:s', $al['created_at']) ?></td>
				<td><a title="编辑" target="navTab"
					href="<?php echo site_url('backend/stock/edit?id=' . $al['id']); ?>"
					class="btnEdit">编辑</a> 
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage: this.value})">
				<?php foreach (array('20','50','100','200') as $v):?>
				<option value="<?php echo $v?>" <?php if($v==$limit):?>
					selected="selected" <?php endif;?>><?php echo $v?></option>
				<?php endforeach;?>
			</select> <span>条，共<?php echo $totalCount?>条</span>
		</div>

		<div class="pagination" targetType="navTab"
			totalCount="<?php echo $totalCount?>"
			numPerPage="<?php echo $limit?>" pageNumShown="10"
			currentPage="<?php echo $pageNum?>"></div>

	</div>
</div>